Skip to content

fix(FR-819): Fix share unit of resource preset.#3489

Merged
graphite-app[bot] merged 1 commit into
mainfrom
fix_FR-819_/fix-share-unit-of-resource-preset
Apr 14, 2025
Merged

fix(FR-819): Fix share unit of resource preset.#3489
graphite-app[bot] merged 1 commit into
mainfrom
fix_FR-819_/fix-share-unit-of-resource-preset

Conversation

@agatha197
Copy link
Copy Markdown
Contributor

@agatha197 agatha197 commented Apr 11, 2025

Resolves #3485 (FR-819)

Add stringMode to InputNumber for Resource Preset Settings

This PR adds the stringMode prop to the InputNumber component in the ResourcePresetSettingModal. This change ensures that decimal values are properly handled when users input resource allocation values, particularly for fields with fractional values.

Changes:

  • Added stringMode={true} to the InputNumber component to preserve decimal precision in resource preset settings

Checklist:

  • Documentation
  • Minium required manager version
  • Specific setting for review (eg., KB link, endpoint or how to setup)
  • Minimum requirements to check during review
  • Test case(s) to demonstrate the difference of before/after

Copy link
Copy Markdown
Contributor Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions Bot added the size:XS ~10 LoC label Apr 11, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 11, 2025

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements 4.18% 409/9781
🔴 Branches 3.55% 240/6765
🔴 Functions 2.54% 79/3111
🔴 Lines 4.12% 394/9566

Test suite run success

124 tests passing in 14 suites.

Report generated by 🧪jest coverage report action from 35ea13e

Copy link
Copy Markdown
Contributor

@nowgnuesLee nowgnuesLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Member

@yomybaby yomybaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Ensure the server correctly handles whether CPU, memory, and accelerator values are numbers or strings. 1
  • It's not ideal to arbitrarily fix values to 2. If the server expects strings, consider using the stringMode prop of InputNumber.

@agatha197 agatha197 force-pushed the fix_FR-819_/fix-share-unit-of-resource-preset branch from cc5c1dd to 426e4d6 Compare April 14, 2025 07:42
@agatha197 agatha197 requested a review from yomybaby April 14, 2025 07:48
@agatha197 agatha197 force-pushed the fix_FR-819_/fix-share-unit-of-resource-preset branch from 426e4d6 to 35ea13e Compare April 14, 2025 07:56
Copy link
Copy Markdown
Member

@yomybaby yomybaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Apr 14, 2025

Merge activity

Resolves #3485 ([FR-819](https://lablup.atlassian.net/browse/FR-819))

## Add `stringMode` to InputNumber for Resource Preset Settings

This PR adds the `stringMode` prop to the InputNumber component in the ResourcePresetSettingModal. This change ensures that decimal values are properly handled when users input resource allocation values, particularly for fields with fractional values.

**Changes:**
- Added `stringMode={true}` to the InputNumber component to preserve decimal precision in resource preset settings

**Checklist:**

- [ ] Documentation
- [ ] Minium required manager version
- [ ] Specific setting for review (eg., KB link, endpoint or how to setup)
- [ ] Minimum requirements to check during review
- [ ] Test case(s) to demonstrate the difference of before/after

[FR-819]: https://lablup.atlassian.net/browse/FR-819?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
@graphite-app graphite-app Bot force-pushed the fix_FR-819_/fix-share-unit-of-resource-preset branch from 35ea13e to 44ee94f Compare April 14, 2025 08:27
@graphite-app graphite-app Bot merged commit 44ee94f into main Apr 14, 2025
5 checks passed
@graphite-app graphite-app Bot deleted the fix_FR-819_/fix-share-unit-of-resource-preset branch April 14, 2025 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS ~10 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix fgpu unit of resource preset.

3 participants